<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 字面量
        let arr1 = ['a', 'b', 'c', 'd', 'e'];


        for(let value of arr1) {
            console.log(value);
        }


        // arr1[5] = 'g';
        // // index

        // for (let i = 0; i < arr1.length; i++) {
        //     console.log(arr1[i]);
        // }

        // console.log(arr1[0]);
        // console.log(arr1[1]);
        // console.log(arr1[2]);
        // console.log(arr1[3]);


        // 查询数据
        // console.log(arr1[1]);
        // 新增、修改
        // arr1[4] = 'e';
        // // arr1[10] = 'hello';
        // arr1[0] = "你好";

        // delete arr1[0]
        // arr1.length = 2;
        // console.log(arr1);







        // 构造函数
        // let arr2 = new Array('a', 'b', 'c', 'd');

        // console.log(arr1);
        // console.log(arr2);


    </script>
</body>

</html>